<?exit?>

<!--/**
 *      [品牌空间] (C)2001-2010 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: sidebar.html.php 5752 2011-10-26 08:41:31Z menglingmin $
 */-->

<div class="sidebar">
	<!--{if $action == 'intro'}-->
		<!--{if $_G['setting']['enablemap'] == 1}-->
			<div class="box">
				<h3>{$lang['shopmap']}</h3>
				<div style="width: 228px; height: 200px;" id="map_canvas"></div>
				<div class="cl">
					<a class="btn_nomal fl" style="margin:5px;" href="store.php?id={$shop['itemid']}&action=map" target="_blank">{$lang['originalmap']}</a>
					<!--{if $_G['uid']}-->
					<a class="btn_nomal fr" style="margin:5px;" href="store.php?id={$shop['itemid']}&action=map&op=mark" target="_blank">{$lang['shopmap_mark']}</a>
					<!--{/if}-->
				</div>
			</div>
			<script src="http://ditu.google.cn/maps/api/js?sensor=true&language=zh-CN" type="text/javascript" charset="utf-8"></script>
			<script type="text/javascript" charset="utf-8">
				function initialize() {

					var latlng;
					var mapapimark = "$shop[mapapimark]";
					var local = "$_SC[local]";

					if(mapapimark) {
						var mapapimarkaction = true;
						latlng = new google.maps.LatLng{$shop['mapapimark']};
					} else {
						if(!local) {
							var defaultmapaction = true;
							latlng = new google.maps.LatLng{$defaultshopmap};
						} else {
							var geoaction = true;
						}
					}
					var myOptions = {
						zoom: 14,
						center: latlng,
						navigationControl: false,
						mapTypeControl: false,
						scaleControl: false,
						mapTypeId: google.maps.MapTypeId.ROADMAP
					};
					var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
					if(mapapimarkaction) {
						var marker = new google.maps.Marker({
							position: latlng,
							map: map,
							title: "{$shop['subject']}"
						});
					} else if(geoaction) {
						var geocoder = new google.maps.Geocoder();
						if(geocoder) {
							geocoder.geocode({'address': local}, function(results, status) {
								if (status == google.maps.GeocoderStatus.OK) {
									map.setCenter(results[0].geometry.location);
								} else {
									alert("{$lang['shopmap_mark_error']}");
								}
							});
						}
					}
				}
				initialize();
			</script>
		<!--{/if}-->
		<!--{if $shop['score'] && $_SGLOBAL['commentmodel']['scorename']}-->
		<div class="score">
			<h3>
				{$lang['shopscore']}
			</h3>
			<ul>
				<!--{loop $_SGLOBAL['commentmodel']['scorename'] $key $scorename}-->
				<!--{if $shop['score'.$key]}-->
					<li><span>$scorename:</span>
						<dl>
							<dt style="width:{$shop['stripwidth'.$key]};">{$shop['score'.$key]} {$lang['fee']}</dt>
						</dl>
					</li>
				<!--{/if}-->
				<!--{/loop}-->
				<li style="color:#925A21;">{$lang['total']} {$shop['remarknum']} {$lang['scorenums']}</li>
			</ul>
		</div>
		<!--{/if}-->
		<!--{if $shop['enablenotice'] }-->
			<!--{block name="sql" parameter="sql/SELECT%20%2A%20FROM%20{$_SC['tablepre']}noticeitems%20WHERE%20shopid%20%3D%20{$shop['itemid']}%20AND%20grade%3D%203%20ORDER%20BY%20displayorder%20DESC%2Cdateline%20DESC/limit/0,5/cachename/sidenotice/tpl/data/pagetype/storelist/usetype/notice/shopid/{$_GET['id']}"}--><!--notice-->
			<!--{if $_SBLOCK['sidenotice']}-->
			<div class="box">
				<h3><span><a href="store.php?id={$shop['itemid']}&action=notice">{$lang['view']}{$lang['all']}&gt;&gt;</a></span>$lang['noticelist']</h3>
				<ul>
					<!--{loop $_SBLOCK['sidenotice'] $ikey $value}-->
					<!--{eval $value['styletitle'] = pktitlestyle($value['styletitle']);}-->
					<li><a{if $value['styletitle']}  style="{$value['styletitle']}"{/if} href="store.php?id=$shop['itemid']&action=notice&xid=$value['itemid']" target="_blank" title="$value[subjectall]"><!--{eval echo cutstr($value[subject],32);}--></a></li>
					<!--{/loop}-->
				</ul>
			</div>
			<!--{/if}-->
		<!--{/if}-->
	<!--{else}-->
	<div class="box shop_base_info">
		<h3>{$lang['shopinfo']}</h3>
		<ul class="hhhh">
			<h4>{$shop['subject']}</h4>
			<!--{if $shop['roundingscore']}-->
			<li id="star_area" class="c_dgreen"><img src="static/image/{$shop['roundingscore']}_big.png" style="vertical-align: middle;"> <font color="red" style="font-size: 14px; vertical-align: middle;">{$shop['score']}</font></li>
			<!--{/if}-->
		</ul>
		<table>
			<!--{if $shop['applicantqq']}-->
			<tr>
				<th>{$lang['kefu']}{$lang['colon']}</th>
				<td><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={$shop[applicantqq]}&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:{$shop[applicantqq]}:46" alt="{$lang[qq_1]}" title="{$lang[qq_2]}" class="vm"></a></td>
			</tr>
			<!--{/if}-->
			<!--{if $shop['isdiscount'] == 1 || $shop['claimedshop']}-->
			<tr>
			<th>{$lang['shop_auth']}{$lang['colon']}</th>
			<td><!--{if $shop['isdiscount'] == 1}--><img title="{$lang[discountshop]}" src="static/image/ico_vip.gif" /> <!--{/if}-->
			<!--{if $shop['claimedshop']}--><img title="{$lang[shop_of_claimed]}" src="static/image/ico_claime.gif" /><!--{/if}--></td>
			</tr>
			<!--{/if}-->
			<!--{if $shop['discount']}-->
			<tr>
			<th>{$lang['disc']}{$lang['colon']}</th>
			<td><div>{eval echo cutstr($shop['discount'], 35); }</div></td>
			</tr>
			<!--{/if}-->
			<!--{if $shop['tel']}-->
			<tr>
			<th>{$lang['tel']}{$lang['colon']}</th>
			<td><div>{$shop['tel']}</div></td>
			</tr>
			<!--{/if}-->
			<tr>
			<th>{$lang['addr']}{$lang['colon']}</th>
			<td><div>{$shop['address']}</div></td>
			</tr>
			<tr>
			<th>{$lang['shopinsubcat']}{$lang['colon']}</th>
			<td><div>$thecat['name']</div></td>
			</tr>
			<!--{if $shop['message']}-->
			<!--{eval $shortDesc = cutstr($shop['message_dec'], 20, $havedot=1);}-->
			<tr>
			<th>{$lang['shopdescription']}{$lang['colon']}</th>
			<td><div id="shopDesc" title="{$shortDesc}">
				{$shortDesc}
				<!--{if ($shop['message'] != $shortDesc)}-->
				&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="store.php?id={$shop['itemid']}&action=intro" style="color:red; cursor:pointer; display:inline;">{$lang['moreDesc']}</a>
				<!--{/if}-->
			</div></td>
			</tr>
			<!--{/if}-->
		</table>
	</div>
	<!--{if $shop['score'] && $_SGLOBAL['commentmodel']['scorename']}-->
		<div class="score">
			<h3>
				{$lang['shopscore']}
			</h3>
			<ul>
				<!--{loop $_SGLOBAL['commentmodel']['scorename'] $key $scorename}-->
				<!--{if $shop['score'.$key]}-->
					<li><span>$scorename:</span>
						<dl>
							<dt style="width:{$shop['stripwidth'.$key]};">{$shop['score'.$key]} {$lang['fee']}</dt>
						</dl>
					</li>
				<!--{/if}-->
				<!--{/loop}-->
				<li style="color:#925A21;">{$lang['total']} {$shop['remarknum']} {$lang['scorenums']}</li>
			</ul>
		</div>
	<!--{/if}-->
	<!--{if $shop['enablenotice'] }-->
		<!--{block name="sql" parameter="sql/SELECT%20%2A%20FROM%20{$_SC['tablepre']}noticeitems%20WHERE%20shopid%20%3D%20{$shop['itemid']}%20AND%20grade%3D%203%20ORDER%20BY%20displayorder%20DESC%2Cdateline%20DESC/limit/0,5/cachename/sidenotice/tpl/data/pagetype/storelist/usetype/notice/shopid/{$_GET['id']}"}--><!--notice-->
		<!--{if $_SBLOCK['sidenotice']}-->
		<div class="box">
			<h3><span><a href="store.php?id={$shop['itemid']}&action=notice">{$lang['view']}{$lang['all']}&gt;&gt;</a></span>$lang['noticelist']</h3>
			<ul>
				<!--{loop $_SBLOCK['sidenotice'] $ikey $value}-->
				<!--{eval $value['styletitle'] = pktitlestyle($value['styletitle']);}-->
				<li><a{if $value['styletitle']}  style="{$value['styletitle']}"{/if} href="store.php?id=$shop['itemid']&action=notice&xid=$value['itemid']" target="_blank" title="$value[subjectall]"><!--{eval echo cutstr($value[subject],32);}--></a></li>
				<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->
	<!--{/if}-->

	<!--{if $action == "consume" && !empty($_GET['xid']) && $shop['enableconsume']}-->
	<!--{block name="sql" parameter="sql/SELECT%20%2A%20FROM%20{$_SC['tablepre']}consumeitems%20WHERE%20shopid%20%3D%20{$shop['itemid']}%20AND%20grade%3D%203%20ORDER%20BY%20displayorder%20DESC%2Cdateline%20DESC/limit/0,2/cachename/consume/tpl/consumer_hot/pagetype/storelist/usetype/consume/shopid/{$_GET['id']}"}--><!--new consume-->
	<!--{/if}-->

	<!--{if $action == "groupbuy" && !empty($_GET['xid']) && $shop['enablegroupbuy']}-->
	<!--{block name="sql" parameter="sql/SELECT%20%2A%20FROM%20{$_SC['tablepre']}groupbuyitems%20WHERE%20shopid%20%3D%20{$shop['itemid']}%20AND%20grade%3D%203%20ORDER%20BY%20displayorder%20DESC%2Cdateline%20DESC/limit/0,2/cachename/groupbuy/tpl/groupbuy_hot/pagetype/storelist/usetype/groupbuy/shopid/{$_GET['id']}"}--><!--new groupbuy-->
	<!--{/if}-->


	<!--{if $action == "good" && !empty($_GET['xid']) && $shop['enablegood']}-->
	<!--{block name="sql" parameter="sql/SELECT%20%2A%20FROM%20{$_SC['tablepre']}gooditems%20WHERE%20shopid%20%3D%20{$shop['itemid']}%20AND%20grade%3D%203%20ORDER%20BY%20viewnum%20DESC%2Cdateline%20DESC/limit/0,2/cachename/sidegood/tpl/data/pagetype/storelist/usetype/good/shopid/{$_GET['id']}"}--><!--new good-->
	<!--{if $_SBLOCK['sidegood']}-->
	<div class="box hot">
		<h3>$lang['hotgood']</h3>
		<ul>
		<!--{loop $_SBLOCK['sidegood'] $good}-->
		<li><a href="store.php?id={$shop['itemid']}&action=good&xid={$good['itemid']}">{$good['subject']}</a></li>
		<!--{/loop}-->
		</ul>
	</div>
	<!--{/if}-->
	<!--{/if}-->
	<!--{if $_G['setting']['enablemap'] == 1}-->
	<div class="box">
		<h3>{$lang['shopmap']}</h3>
		<div style="width: 228px; height: 200px;" id="map_canvas"></div>
		<div class="cl">
			<a class="btn_nomal fl" style="margin:5px;" href="store.php?id={$shop['itemid']}&action=map" target="_blank">{$lang['originalmap']}</a>
			<!--{if $_G['uid']}-->
			<a class="btn_nomal fr" style="margin:5px;" href="store.php?id={$shop['itemid']}&action=map&op=mark" target="_blank">{$lang['shopmap_mark']}</a>
			<!--{/if}-->
		</div>
	</div>
	<script src="http://ditu.google.cn/maps/api/js?sensor=true&language=zh-CN" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" charset="utf-8">
		function initialize() {

			var latlng;
			var mapapimark = "$shop[mapapimark]";
			var local = "$_SC[local]";

			if(mapapimark) {
				var mapapimarkaction = true;
				latlng = new google.maps.LatLng{$shop['mapapimark']};
			} else {
				if(!local) {
					var defaultmapaction = true;
					latlng = new google.maps.LatLng{$defaultshopmap};
				} else {
					var geoaction = true;
				}
			}
			var myOptions = {
				zoom: 14,
				center: latlng,
				navigationControl: false,
				mapTypeControl: false,
				scaleControl: false,
				mapTypeId: google.maps.MapTypeId.ROADMAP
			};
			var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
			if(mapapimarkaction) {
				var marker = new google.maps.Marker({
					position: latlng,
					map: map,
					title: "{$shop['subject']}"
				});
			} else if(geoaction) {
				var geocoder = new google.maps.Geocoder();
				if(geocoder) {
					geocoder.geocode({'address': local}, function(results, status) {
						if (status == google.maps.GeocoderStatus.OK) {
							map.setCenter(results[0].geometry.location);
						} else {
							alert("{$lang['shopmap_mark_error']}");
						}
					});
				}
			}
		}
		initialize();
	</script>
	<!--{/if}-->
	<!--{if !empty($brandlinkslist) && $shop['enablebrandlinks']}-->
	<div class="box">
		<h3>{$lang['brandlinks']}</h3>
		<ul>
		<!--{loop $brandlinkslist $brandlink}-->
			<li><a href="{$brandlink['url']}" target="_blank" title="{$brandlink['name']}">{$brandlink['shortname']}</a></li>
		<!--{/loop}-->
		</ul>
	</div>
	<!--{/if}-->
	<!--{/if}-->
</div>
